package org.jxau.service.impl;

import java.util.List;

import org.jxau.bean.Systems;
import org.jxau.bean.UserInfo;
import org.jxau.dao.UserInfoDao;
import org.jxau.dao.impl.UserInfoDaoImpl;
import org.jxau.service.UserInfoService;
import org.jxau.tools.DBTools;



public class UserInfoServiceImpl implements UserInfoService {
	UserInfoDao dao=new UserInfoDaoImpl();
	@Override
	public UserInfo login(Integer id, String pwd) {
		UserInfo info=null;
		info=dao.getUserInfoByIdAndName(id, pwd);
		DBTools.closeSqlSession();
		return info;
	}
	@Override
	public List<Systems> getSystemsByRolesId(int rid) {
		List<Systems> list=dao.getSystemOfRoles(rid);
		DBTools.closeSqlSession();
		return list;
	}
	@Override
	public List<Systems> getSystemsAll() {
		List<Systems> list=dao.getAllSystems();
		DBTools.closeSqlSession();
		return list;
	}
}



















